class Solution {//leetcode392判断子序列
public:
    bool isSubsequence(string s, string t) {
        int sptr=0,tptr=0;
        if(s[0]=='\0'&&t[0]=='\0') return true;
        while(t[tptr]!='\0'){
            if(s[sptr]==t[tptr])
            {
                sptr++;
            }
            if(s[sptr]=='\0') return true;
            tptr++;
        }
        return false;
    }
};